FROM eclipse-temurin:17-jre
WORKDIR /app

# 复制构建产物
COPY target/*.jar app.jar

ENV SERVER_PORT=8080 \
    MODEL_CFG_KEY=please-change-this-long-random-secret \
    JWT_SECRET=your-256-bit-secret-key-for-jwt-token-generation-must-be-at-least-32-characters-long

EXPOSE 8080

HEALTHCHECK --interval=30s --timeout=3s --retries=3 CMD curl -fsS http://localhost:${SERVER_PORT}/actuator/health || exit 1

ENTRYPOINT ["java","-jar","/app/app.jar"]


